package com.sxzbxc.weixin.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sxzbxc.weixin.dao.DicMelfunctionDao;
import com.sxzbxc.weixin.entity.DicMelfunction;
import com.sxzbxc.weixin.service.DicMelfunctionServiceI;

@Service("dicMelfunctionImpl")
public class DicMelfunctionImpl implements DicMelfunctionServiceI{

	@Autowired
	private DicMelfunctionDao dicMelfunctionDao;
	
	public List<DicMelfunction> loadAll() {
		List<DicMelfunction> loadAll = dicMelfunctionDao.loadAll();
		
		return loadAll;
	}

	@Override
	public void insertSelective(DicMelfunction entity) {
		dicMelfunctionDao.insertSelective(entity);
	}

	@Override
	public DicMelfunction selectByPrimaryKey(String id) {
		DicMelfunction dicMelfunction = dicMelfunctionDao.selectByPrimaryKey(id);
		if(dicMelfunction!=null){
			return dicMelfunction;
		}
		return null;
	}

	@Override
	public void updateByPrimaryKeySelective(DicMelfunction record) {
		dicMelfunctionDao.updateByPrimaryKeySelective(record);
	}

	@Override
	public DicMelfunction selectByMelCode(String melCode) {
		DicMelfunction selectByMelCode = dicMelfunctionDao.selectByMelCode(melCode);
		if(selectByMelCode!=null){
			return selectByMelCode;
		}
		return null;
	}

	@Override
	public void deleteByPrimaryKey(String id) {
		dicMelfunctionDao.deleteByPrimaryKey(id);
	}

}
